export const LINE_HEIGHT = 24
export const NODE_WIDTH = 240
export const erRectTemplate = {
  inherit: 'rect',
  markup: [
    {
      tagName: 'rect',
      selector: 'body'
    },
    {
      tagName: 'text',
      selector: 'label'
    }
  ],
  attrs: {
    rect: {
      strokeWidth: 1,
      stroke: '#5F95FF',
      fill: '#5F95FF'
    },
    label: {
      fontWeight: 'bold',
      fill: '#ffffff',
      fontSize: 14
    }
  },
  ports: {
    groups: {
      point: {
        position: 'right',
        attrs: {
          circle: {
            magnet: true,
            stroke: '#8f8f8f',
            r: 5,
          },
        },
      },
      list: {
        markup: [
          {
            tagName: 'rect',
            selector: 'portBody'
          },
          {
            tagName: 'text',
            selector: 'portNameLabel'
          },
          {
            tagName: 'text',
            selector: 'portTypeLabel'
          }
        ],
        attrs: {
          portBody: {
            width: NODE_WIDTH,
            height: LINE_HEIGHT,
            strokeWidth: 1,
            stroke: '#5F95FF',
            fill: '#EFF4FF',
            magnet: true
          },
          portNameLabel: {
            ref: 'portBody',
            refX: 6,
            refY: 6,
            fontSize: 12
          },
          portTypeLabel: {
            ref: 'portBody',
            refX: 175,
            refY: 6,
            fontSize: 10
          }
        },
        position: 'erPortPosition'
      }
    }
  }
}
export const erRectNode = {
  id: new Date().getTime(),
  shape: 'er-rect',
  label: 'Source Table',
  width: NODE_WIDTH,
  height: LINE_HEIGHT,
  position: {
    x: 0,
    y: 0
  },
  data: {
    disableMove: true,
    type: 'table'
  },
  ports: [
    // {
    //   id: '12312312312',
    //   group: 'point'
    // }
  ]
}
